from .util_log import logs_info, logs_error
import pytest



def equal(actual, expected, msg: str = ""):
    if actual == expected:
        text = f"✅ 断言成功 | 实际值:{actual} == 期望值:{expected}"
        logs_info(text)
    else:
        error_text = msg or f"❌ 断言失败 | 实际值:{actual} != 期望值:{expected}"
        logs_error(error_text)
        pytest.fail(error_text)
